package cn.itrip.controller;

import cn.itrip.pojo.Dto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "测试用例",description = "这是一个用来测试的sawwger类",tags = {"222"})
@RestController
public class SystemCommentController {

    @ApiOperation(value = "addObject用来添加用户",
            httpMethod = "POST",protocols = "http",
            notes = "用来注册的方法",response = Dto.class)
    @RequestMapping(value="/addUser" ,method = RequestMethod.GET)
    public Dto addObject(@ApiParam(required = true,name = "用户名",allowableValues = "长度6位")
                                     String username, String password, Integer id){
        Dto dto=new Dto();
        dto.setErrorCode("100000");
        dto.setMsg("用户添加成功");
        return dto;
    }

}
